document.addEventListener("DOMContentLoaded", () => {
    document.getElementById("import").addEventListener("click",  async () => {
        var tab = await browser.tabs.getCurrent();
        browser.scripting.executeScript({
            target : { tabId: tab.id },
            files : [ "content.js" ]
        });
    });
    document.getElementById("export").addEventListener("click",  async () => {
        var tab = await browser.tabs.getCurrent();
        browser.scripting.executeScript({
            target : { tabId: tab.id },
            files : [ "content2.js" ]
        });
    });
});
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
    if (request == "import"){
        sendResponse({text:document.getElementById("text").value,farewell: "goodbye"});
    }
});
